package com.lyf.export.service.model;

/**
 * @author lyf95
 */
public enum AsyncExportStateEnum {

    TO_BE_EXPORT(0, "待导出"),
    EXPORT_SUCCESS(1, "导出成功"),
    EXPORT_FAIL(2, "导出失败"),

    ;

    private int code;


    private String name;

    AsyncExportStateEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


    public static AsyncExportStateEnum getByCode(int code) {
        for (AsyncExportStateEnum temp : AsyncExportStateEnum.values()) {
            if (temp.getCode() == code) {
                return temp;
            }
        }
        return null;
    }

}
